package com.yupi.springbootinit.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yupi.springbootinit.model.entity.ProcessSheetBatchProduct;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

/**
 * 版次产品明细 Mapper
 */
public interface ProcessSheetBatchProductMapper extends BaseMapper<ProcessSheetBatchProduct> {
    /**
     * 物理删除指定版次的所有产品
     */
    @Delete("DELETE FROM process_sheet_batch_product WHERE batch_id = #{batchId}")
    int physicalDeleteByBatchId(@Param("batchId") Long batchId);
}